package com.springboot.demo.design.pattern.strategy;

import org.springframework.stereotype.Service;

/**
 * 高级会员策略
 *
 * @author supu
 * @date 2019-07-05 14:45
 **/
@Service
public class AdvancedMemberStrategy implements MemberStrategy {
    @Override
    public String getType() {
        return "advanced";
    }

    @Override
    public double calculate(double price) {
        // 高级会员打八折
        return price * 0.8;
    }
}
